<template>
    <view :class="[JkClass, 'jk-grid-item']" :style="getStyle">
        <slot></slot>
    </view>
</template>

<script>
    export default {
        name: "GridItem",
        props: {
            width: {
                type: String,
                dafault: '33.33333333%'
            },
            JkClass: {
                type: String,
                dafault: ''
            }
        },
        computed: {
            getStyle(){
                return `width:${this.width}`;
            }
        }
    }
</script>

<style lang="scss">
    .jk-grid-item {
        position: relative;
        float: left;
        padding: 20px 10px;
        width: 33.33333333%;
        box-sizing: border-box;
        border-right: 1rpx solid #e9eaec;
        border-bottom: 1rpx solid #e9eaec;
    }
</style>
